package com.huarui.purchaseOrder.action;

import java.util.Map;

import org.ewaf.framework.action.BaseAction;

import com.huarui.purchaseOrder.service.PurchaseOrderService;

public class PurchaseAgreeToRecieveAction extends BaseAction{

	public static final String MESS = "mess";
	
	private static final long serialVersionUID = 5500016919661647608L;

	private PurchaseOrderService purchaseOrderService;
	
	private Map<String, Object> mesMap;
	
	private Integer ordersId;
	
	public Map<String, Object> getMesMap() {
		return mesMap;
	}

	public void setMesMap(Map<String, Object> mesMap) {
		this.mesMap = mesMap;
	}


	public Integer getOrdersId() {
		return ordersId;
	}

	public void setOrdersId(Integer ordersId) {
		this.ordersId = ordersId;
	}

	public void setPurchaseOrderService(PurchaseOrderService purchaseOrderService) {
		this.purchaseOrderService = purchaseOrderService;
	}

	/**
	 * 在线同意收货
	 * @return
	 */
	public String onlineAgreeToRecieve() {
		mesMap = purchaseOrderService.agreeToRecieve(ordersId);
		return MESS;
	}
	
	/**
	 * 非在线同意收货
	 * @return
	 */
	public String notOnlineAgreeToRecieve() {
		mesMap = purchaseOrderService.agreeToRecieve(ordersId);
		return MESS;
	}
}
